﻿using Digitalmes.Domain.Entities.Mes.Masters;

namespace Digitalmes.Domain.Entities.Mes.Equipments;

/// <summary>
/// 设备表
/// </summary>
[SugarTable("equip_machinery")]
public sealed class EquipMachinery : AuditedEntity
{
    /// <summary>
    /// 设备编号
    /// </summary>
    [NotNull]
    public string? Code { get; set; }

    /// <summary>
    /// 设备名称
    /// </summary>
    [NotNull]
    public string? Name { get; set; }

    /// <summary>
    /// 品牌
    /// </summary>
    public string? Brand { get; set; }

    /// <summary>
    /// 设备型号
    /// </summary>
    public string? Model { get; set; }

    /// <summary>
    /// 设备规格
    /// </summary>
    public string? Spec { get; set; }

    /// <summary>
    /// 制造商
    /// </summary>
    public string? Manufacturer { get; set; }

    /// <summary>
    /// 购入时间
    /// </summary>
    public string? PurchaseDate { get; set; }

    /// <summary>
    /// 所属设备类型 Id，Ref <see cref="EquipMachineryCatalog"/>
    /// </summary>
    public long CatalogId { get; set; }

    /// <summary>
    /// 所属车间 Id，Ref <see cref="MdWorkshop"/>
    /// </summary>
    public long WorkshopId { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 设备状态（如停机等）
    /// </summary>
    public int Status { get; set; }
}
